﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace WeChatGZHTextExtractor.Tools
{
    public class SaveFileHelper
    {

        /// <summary>
        /// 下载保存路径
        /// </summary>
        public const string SavePath = "DownLoad";

        /// <summary>
        /// 获取保存的全路径
        /// </summary>
        /// <returns></returns>
        public static string GetSaveFullPath()
        {
            return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, SavePath);
        }

        /// <summary>
        /// 获取保存位置
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        internal static string GetSaveFullPath(string file)
        {
            return Path.Combine(GetSaveFullPath(), file);
        }

        /// <summary>
        /// 获取相对地址
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        public static string GetRelativePath(string file)
        {
            return Path.GetRelativePath(GetSaveFullPath(), file);
        }
    }
}
